import request from '@/utils/request'

// 查询客户员工认领列表
export function listCustomerUser(query) {
  return request({
    url: '/crm/customerUser/list',
    method: 'get',
    params: query
  })
}

// 查询客户员工认领详细
export function getCustomerUser(customerUserId) {
  return request({
    url: '/crm/customerUser/' + customerUserId,
    method: 'get'
  })
}
export function getMyCustomerUsers() {
  return request({
    url: '/crm/customerUser/getMyCustomerUsers' ,
    method: 'get'
  })
}


// 新增客户员工认领
export function addCustomerUser(data) {
  return request({
    url: '/crm/customerUser',
    method: 'post',
    data: data
  })
}

// 修改客户员工认领
export function updateCustomerUser(data) {
  return request({
    url: '/crm/customerUser',
    method: 'put',
    data: data
  })
}

// 删除客户员工认领
export function delCustomerUser(customerUserId) {
  return request({
    url: '/crm/customerUser/' + customerUserId,
    method: 'delete'
  })
}

// 导出客户员工认领
export function exportCustomerUser(query) {
  return request({
    url: '/crm/customerUser/export',
    method: 'get',
    params: query
  })
}

export function getNewCustomerUsers(query) {
  return request({
    url: '/crm/customerUser/getNewCustomerUsers' ,
    method: 'get',
    params: query
  })
}